﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RockScissorPaper
{
    public enum EnumResult
    {
        玩家赢,
        电脑赢,
        平手
    }
    public enum EnumFist
    {
        石头=1,
        剪刀=2,
        布=3
    }
    public class Judge
    {
        //裁判
        public static EnumResult GetResult(int player,int computer)
        {
            if (player == computer)
                return EnumResult.平手;
            else if (player - computer == -1 || player - computer == 2)
                return EnumResult.玩家赢;
            else
                return EnumResult.电脑赢;
        }
    }
}
